<%--
  Created by IntelliJ IDEA.
  User: finder
  Date: 2021/10/19
  Time: 9:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script>
        document.getElementById("num").innerText("0");
        function like(){
            var xhr=new XMLHttpRequest();
            xhr.open("Get","likeServlet",true);
            xhr.send();
            xhr.onreadystatechange=function () {
                if(xhr.readyState==4&&xhr.status==400){
                    xhr.responseText
                }
            }
        }
    </script>
</head>
<body>
<input type="button" value="点赞" onclick="like()">当前点赞量：<span id="num" style="color: red"></span>
</body>
</html>
